package com.wise.service.cms.content.resourcegroup;

import com.wise.entities.content.ResourceGroup;
import com.wise.framework.daomodel.DaoOne;
import com.wise.framework.logger.Logger;
import com.wise.summer.v1.cms.content.resourcegroup.GetResourceGroupById;
import org.springframework.stereotype.Service;
import org.summerframework.model.SummerService;
import org.summerframework.model.SummerServiceBean;

import static com.wise.model.content.ContentErrMsgs.Err_100100000004;

/**
 * @author yubo
 */
@Service
@SummerService
public class GetResourceGroupsService implements SummerServiceBean<GetResourceGroupById> {
	private static final Logger log = Logger.getLogger(GetResourceGroupsService.class);

	@Override
	public void sum(GetResourceGroupById summer) {
		ResourceGroup groups = DaoOne.s(ResourceGroup.class, summer.getId(), Err_100100000004);

		summer.setSummerResult(groups);
	}
}
